﻿using System.Runtime.Serialization;
using System;

namespace NetBay.Core.BusinessEntities.Barcodes
{
    [KnownType(typeof(BarcodeFolderSeparator))]
    [KnownType(typeof(BarcodeDocumentSeparator))]
    [DataContract]
    public abstract class BarcodeSeparator : ReturnObject
    {

        /// <summary>
        /// Gets or sets the identifier.
        /// </summary>
        /// <value>The identifier.</value>
        [DataMember]
        public long Identifier { get; set; }

        /// <summary>
        /// Gets or sets the CAB identifier.
        /// </summary>
        /// <value>The CAB identifier.</value>
        [DataMember]
        public long CabIdentifier { get; set; }

        /// <summary>
        /// Gets or sets the delete Barcode page.
        /// </summary>
        /// <value>The Barcode delete page.</value>
        [DataMember]
        public bool DeleteBarCodePage { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separator folder managment error.
        /// </summary>
        /// <value>The Barcode separatror folder managment error.</value>
        [DataMember]
        public bool ErrorManagment { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separator folder document limit.
        /// </summary>
        /// <value>The Barcode separatror folder document limit.</value>
        [DataMember]
        public bool DocLimit { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separatror folder inferiore limit.
        /// </summary>
        /// <value>The Barcode separatror folder inferiore limit.</value>
        [DataMember]
        public int InfLimit { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separatror folder superiore limit.
        /// </summary>
        /// <value>The Barcode separatror folder unique superiore limit.</value>
        [DataMember]
        public int SupLimit { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separatror folder organization id.
        /// </summary>
        /// <value>The Barcode separatror folder organization id.</value>
        [DataMember]
        public long OrganizationId { get; set; }

        /// <summary>
        /// Gets or sets the Barcode separatror folder folder id.
        /// </summary>
        /// <value>The Barcode separatror folder folder id.</value>
        [DataMember]
        public long FolderTypeId { get; set; }

        /// <summary>
        /// Gets or sets the Barcode name.
        /// </summary>
        /// <value>The Barcode separatror name.</value>
        [DataMember]
        public string BarcodeName { get; set; }

        /// <summary>
        /// Gets or sets the type of barcode.
        /// </summary>
        /// <value>The type of barcode.</value>
        [DataMember]
        public abstract BarcodeSeparatorType TypeOfBarcode { get; set; }


       #region Init/Constructor
        /// <summary>
        /// Default constructor
        /// </summary>
        public BarcodeSeparator()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Document"/> class for error usages
        /// </summary>
        /// <param name="errorMessage">The error message.</param>
        /// <param name="applicationException">The application exception.</param>
        public BarcodeSeparator(string errorMessage, Exception applicationException = null)
            : base(errorMessage, applicationException)
        {
        }
        #endregion
    }
}
